package com.health.inquiry.server.controller;

import com.health.common.core.web.domain.AjaxResult;
import com.health.inquiry.server.service.BodyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * 身体部位
 */
@RestController
@RequestMapping("/part")
public class BodyController {
    @Autowired
    private BodyService bodyService;


    /**
     * 身体部位列表
     * @return
     */
    @GetMapping("/list")
    public AjaxResult list() {
        return AjaxResult.success(bodyService.selectSymptomList());
    }


    /**
     * 根据部位id查找症状
     * @param bodyId
     * @return
     */
    @GetMapping("/disease/{bodyId}")
    public AjaxResult disease(@PathVariable("bodyId") Long bodyId) {
        return AjaxResult.success(bodyService.selectDiseaseList(bodyId));
    }








}
